<%@page import="entity.Visitor"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
		<div class="banner">
			<img alt="banner" src="images/customLogo.jpg">
		</div>
		<div>
		
		<%
		    Visitor visitor = null;
		    byte role = -1;
		    try{    	
		    	visitor = (Visitor)session.getAttribute("curSession");
		        if (visitor != null) {
		        	role = visitor.getRole();
		        } else {
		        	role = -1;
		        }
		    }catch(Exception ex){
		        System.out.println(" home page says: " + ex.getMessage());
		    }
		 %>	
			<div class="homepage">
		        <a href="index.jsp">Home Page</a>
			</div>
			<div>			
				<% if (role == 1) { // role = 1 la addmin %>
			    <div class="loginS">
			        <ul>
			            <li> <a href = "logout" > Logout </a> </li>					    			
					</ul>
				</div>	
				<div class="loginS">
			        <ul>
			            <li> <a href="listbooktour"> List book tour </a> </li>				    			
					</ul>
				</div>					
			    <div class="loginS">
			        <ul>
			            <li> <a href="addtour.jsp"> Addtour </a> </li>				    			
					</ul>					
				</div>				
			<% } else if (role == 0) { %>
				<div class="loginS"> 
				    <ul>
				        <li> <a href = "logout" > Logout </a> </li>
					</ul>
				</div>
			<% } else { %>	
			    <div class="loginS"> 	    
				    <ul>
				        <li> <a href = "login.jsp" > Logon </a> </li>				        
					</ul>
				</div>		
			    <div class="loginS"> 	    
				    <ul>
				    	<li> <a href = "register.jsp" > Register </a> </li>			        
					</ul>
				</div>										
				<% } %>	
				
			
			    <div class="loginS">
				        <ul>
						    <li> <a href = "searchVisitor.jsp" > Search Visitor </a> </li>			
						</ul>
				</div>
				
				<div class="loginS">
				        <ul>
						    <li> <a href = "searchTour.jsp" > Search Tour </a> </li>			
						</ul>
				</div>
				
			</div>
		</div>